﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" xmlns:EzDesk_DesktopClient="clr-namespace:EzDesk.DesktopClient" x:Class="EzDesk.DesktopClient.View.ContentTabView" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
    	<i:Interaction.Triggers>
    		<ei:PropertyChangedTrigger Binding="{Binding IsContentDisplayed}">
    			<i:Interaction.Behaviors>
    				<ei:ConditionBehavior>
    					<ei:ConditionalExpression>
    						<ei:ComparisonCondition LeftOperand="{Binding IsContentDisplayed}" RightOperand="true"/>
    					</ei:ConditionalExpression>
    				</ei:ConditionBehavior>
    			</i:Interaction.Behaviors>
    			<ei:GoToStateAction StateName="DisplayedState"/>
    		</ei:PropertyChangedTrigger>
    		<ei:PropertyChangedTrigger Binding="{Binding IsContentDisplayed}">
    			<i:Interaction.Behaviors>
    				<ei:ConditionBehavior>
    					<ei:ConditionalExpression>
    						<ei:ComparisonCondition LeftOperand="{Binding IsContentDisplayed}" RightOperand="false"/>
    					</ei:ConditionalExpression>
    				</ei:ConditionBehavior>
    			</i:Interaction.Behaviors>
    			<ei:GoToStateAction StateName="HiddenState"/>
    		</ei:PropertyChangedTrigger>
    	</i:Interaction.Triggers>
    	<VisualStateManager.VisualStateGroups>
    		<VisualStateGroup x:Name="ContentStates">
    			<VisualStateGroup.Transitions>
    				<VisualTransition GeneratedDuration="0:0:0.4"/>
    				<VisualTransition From="DisplayedState" GeneratedDuration="0:0:0.4" To="HiddenState">
    					<VisualTransition.GeneratedEasingFunction>
    						<CircleEase EasingMode="EaseIn"/>
    					</VisualTransition.GeneratedEasingFunction>
    				</VisualTransition>
    				<VisualTransition From="HiddenState" GeneratedDuration="0:0:0.4" To="DisplayedState">
    					<VisualTransition.GeneratedEasingFunction>
    						<CircleEase EasingMode="EaseOut"/>
    					</VisualTransition.GeneratedEasingFunction>
    					<Storyboard>
    						<DoubleAnimation BeginTime="0:0:0.3" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grid">
    							<DoubleAnimation.EasingFunction>
    								<CircleEase EasingMode="EaseOut"/>
    							</DoubleAnimation.EasingFunction>
    						</DoubleAnimation>
    					</Storyboard>
    				</VisualTransition>
    			</VisualStateGroup.Transitions>
    			<VisualState x:Name="HiddenState">
    				<Storyboard>
    					<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grid">
    						<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
    					</DoubleAnimationUsingKeyFrames>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grid">
    						<DiscreteObjectKeyFrame KeyTime="0">
    							<DiscreteObjectKeyFrame.Value>
    								<Visibility>Collapsed</Visibility>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    				</Storyboard>
    			</VisualState>
    			<VisualState x:Name="DisplayedState"/>
    		</VisualStateGroup>
    	</VisualStateManager.VisualStateGroups>
        <Grid x:Name="head"  Grid.Row="0" VerticalAlignment="Top">
            <Path Data="M7256.2344,6969.772C7246.4954,6967.114,7248.1084,6951.452,7237.0894,6951.452L7072.3794,6951.452 7072.5004,6970" StrokeStartLineCap="Flat" Stretch="Fill" StrokeEndLineCap="Flat" Stroke="#FF999999" StrokeThickness="1" StrokeMiterLimit="4" StrokeLineJoin="Miter" HorizontalAlignment="Left" Width="150" Fill="White"/>
            <TextBlock HorizontalAlignment="Left" Text="{DynamicResource YourMsg}" Foreground="#FF333333" Margin="45,3,0,3.163" d:LayoutOverrides="Height"/>
            <StackPanel HorizontalAlignment="Right" Width="100" Orientation="Horizontal" ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <ToggleButton x:Name="MarkToggleButton" Content="ToggleButton" Style="{DynamicResource StarToggleButton}" Width="18" Height="18"  HorizontalAlignment="Center" Command="{Binding FilterFeedByIsMarkCommand}" CommandParameter="{Binding ElementName=MarkToggleButton,Path=IsChecked}"/>
            </StackPanel>
        </Grid>
        <Grid x:Name="grid" Grid.Row="1">
            <Border CornerRadius="3" BorderBrush="#FF999999" BorderThickness="1" Background="#FF3D3D3D" >
        		<ContentControl Content="{Binding FeedViewModel.View}"/>
        	</Border>
        </Grid>
    </Grid>
</UserControl>
